bcm2835-mmc: Prevent DMA race condition
authorPhil Elwell <phil@raspberrypi.org>
Tue, 18 Jul 2017 14:30:48 +0000 (15:30 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 15 Feb 2018 17:38:10 +0000 (17:38 +0000)
commit4e2ef7f8c1b073d881936fda263f877be135db1b
tree049837f48b355e56eeffad354dac3bc4d860db62
parentd49d49aec7c0a0af38b1540d1dfae910459f8975
bcm2835-mmc: Prevent DMA race condition

The end of a read operation is triggered by the completion of the DMA
transfer, but writes are complete when the data IRQ is raised. The
bcm2835-mmc driver contains a race between the handling of the DMA
completion interrupt and the submission of the next request. Fix the
race by deferring the completion of the request until the DMA
transfer finishes.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/host/bcm2835-mmc.c